/*
 * libc/string/strcasecmp.c
 */

#include <types.h>
#include <ctype.h>
#include <string.h>

char * strcasestr(const char * src, const char * find)
{
    if(NULL == src || NULL == find)
        return NULL;
    char * cp =  (char *) src;
    char * s1 , * s2;
    while(*cp){
        s1 = cp;
        s2 = (char * )find;
        while(*s2 && *s1 && !(tolower(*s1) - tolower(*s2)))
            s1++,s2++;
        if(!(*s2))
            return cp;
        cp++;
    }  
    return NULL;
}
